<?php

use Illuminate\Database\Seeder;

class TicketOrderTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('wy_ticket_order')->truncate();
        for ($i = 1; $i < 100; $i++) {
            DB::table('wy_ticket_order')->insert([
                'uuid'        => 'B' . date('ymd') . rand(00001, 99999),
                'name'        => '李' . $i,
                'mobile'      => '152' . rand(10000000, 99999999),
                'trade_cash'  => rand(0, 200),
                'user_id'     => rand(0, 30),
                'referrer_id' => rand(1, 30),
                'merchant_id' => rand(1, 5),
                'region_id'   => rand(1, 5),
                'status'      => rand(0, 5),
                'created_at'  => date('Y-m-' . rand(1, 30) . ' H:i:s')
            ]);
        }
    }
}
